$(function(){
    var start = new google.maps.LatLng(50.619192,26.250629);
    var mapOptions = {
      zoom: 14,
      center: start,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);

    // Stops
    Point.getForm().hide();
    Point.getForm().submit(Point.onSubmit);
    Point.reloadList();
    $('#point_cancel').click(Point.onCancel);

    $("#points_grid").jqGrid({
        url: BASE_URL + '/map/point/list-grid',
        datatype: 'json',
        mtype: 'GET',
        colNames:['Name', 'Public'],
        colModel :[
            {name:'name', index:'point_name', width:90},
            {name:'is_public', index:'is_public', width:80, align:'right'}
        ],
        pager: '#points_pager',
        rowNum: 10,
        rowList: [10,20,30],
        sortname: 'point_pid',
        sortorder: 'desc',
        viewrecords: true,
        caption: 'My Points',
        width: 450,
        height: 400
    });
});